package com.example.myapplication.database.table;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

import androidx.annotation.Nullable;

public class ImageDatabase extends SQLiteOpenHelper {
    public static final  String ImageDatabase ="create table imagetb(id integer primary key autoincrement,pic text,"
            + "title varchar(20),painter varchar(50),summary text,author varchar(50))";
    private Context mcontext;
    public ImageDatabase(@Nullable Context context, @Nullable String name, @Nullable SQLiteDatabase.CursorFactory factory, int version) {
        super(context, name, factory, version);
        mcontext=context;
    }

    @Override
    public void onCreate(SQLiteDatabase db) {
        db.execSQL(ImageDatabase);
    }

    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {

    }
}
